//	--------------------------------------------------------------------
//	Copyright(C) 2006,2007 Zhao Yukun. All rights reserved.
//	This file is a part of the Xeres system.
//	Xeres 2007
//	Contact : xeres.engine@gmail.com
//	$(reservedInfo)
//	$(reservedDeclaration)
//	--------------------------------------------------------------------
///	@file	<editor_engine.h>
///	@path	~/src/editor/
///	@date	2008/10/23
///	@desc	.

#pragma once

#include "editor/editor.h"

#include "database/database.h"
#include "database/store/IFileSystem.h"

#include "scene/ICamera.h"

namespace xeres {

	// forward declaration
	class Engine;

	/*! 
		\class	XEditor
		\brief
	*/
	class XEditor
	{
	private:

		/// \ctor
		XEditor( void );

		/// \dtor
		~XEditor( void );

	public:

		/// \instance
		static XEditor& instance( void );

		/// \brief	Initialize engine for editor.
		void Initialize( class XEngineView * engineView );

		/// \brief	Finalize engine for editor.
		void Finalize( void );

		/// \brief	Get engine of editor.
		Engine& engine( void ) { return m_engine; }

	private:

		friend class xeditor_helper;

		//@ data

		// engine instance.
		Engine&				m_engine;

		// engine window.
		HWND				m_engineWnd;

		// settings
		Ref<IFileSystem>	m_etc;

		// resource
		Ref<IFileSystem>	m_res;

		// temporary
		Ref<IFileSystem>	m_tmp;

		// camera
		Ref<ICamera>		m_camera;
	};

	
} // namespace xeres
